<template>
  <div class="deposit-success-wrap">
    <img src="../../images/successful2.png" class="pic"/>
    <span class="status-text">提现发起成功，等待处理</span>
    <span class="count-down">{{countTime}}s后自动跳转至提现详情</span>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        countTime: 3,
        depositId: this.$route.query.depositId
      }
    },
    mounted() {
      this.countDown(3);
    },
    methods: {
      countDown(sec) {
        this.countTime = sec;
        if (--sec > 0) {
          setTimeout(() => {
            this.countDown(sec);
          }, 1000);
        }
        else {
          this.$router.push({path: "/depositDetail", query: {"depositId": this.depositId}});
        }
      }
    }
  }
</script>

<style lang="less" scoped>
  @import "../../assest/mixin";

  .deposit-success-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    .wh(100%, 100%);
    background: #FFF;
    .pic {
      padding-top: 1.733rem;
      padding-bottom: 0.8rem;
      .wh(1.6rem, 1.6rem);
    }
    .status-text {
      padding-bottom: 0.4rem;
      .size-color(0.427rem, rgba(51, 51, 51, 1));
    }
    .count-down {
      .size-color(0.373rem, rgba(153, 153, 153, 1));
    }
  }
</style>
